import java.util.Scanner;

public class test1 {
    static void main() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入机票的原价");
        int ticket = sc.nextInt();
        System.out.println("请输入当前的月份");
        int month = sc.nextInt();
        System.out.println("请输入头等舱0或者是经济舱1");
        int seat = sc.nextInt();
        if (month >=5 && month <= 10) {
            if(seat==0){
                ticket=(int)(ticket*0.9);
            }else if(seat==1){
                ticket=(int)(ticket*0.8);
            }
            System.out.println("没有这个舱位");}
        else if((month>=1&&month<=4) || (month>=11&&month<=12)){
            if(seat==0) {
                ticket = (int) (ticket * 0.7);
            }else if (seat==1){
                    ticket=(int)(ticket*0.6);
                }else{
                    System.out.println("没有这个舱位");
                }
            }
        System.out.println(ticket);
        }



    }

